//
//  ControllorManager.m
//  恒记
//
//  Created by can on 16/5/5.
//  Copyright © 2016年 can. All rights reserved.
//

#import "ControllorManager.h"
static ControllorManager *manager = nil;
@implementation ControllorManager

+ (ControllorManager *)shareManager{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manager = [[ControllorManager alloc] init];
    });
    
    return manager;
}
-(UINavigationController *)rootViewController{
    if (_rootViewController == nil) {
        _rootViewController = [[UINavigationController alloc] initWithRootViewController:self.sideVc];
        _rootViewController.navigationBarHidden = YES;
    }
    return _rootViewController;
}

-(SideViewController *)sideVc{
    if (_sideVc == nil) {
        _sideVc = [[SideViewController alloc] initWithContentViewController:self.contentVc HomeViewController:self.homeVc];
    }

    return _sideVc;
}

-(SideContentViewController *)contentVc{
    if (_contentVc == nil) {
        _contentVc = [[SideContentViewController alloc] init];
        _contentVc.view.center = CGPointMake(_contentVc.view.center.x + SCREEN_WIDTH*3/5, _contentVc.view.center.y);
        _contentVc.view.alpha = 0.0;
    
}
    return _contentVc;
}

-(HomeViewController *)homeVc{
    if (_homeVc == nil) {
        _homeVc = [[HomeViewController alloc] init];
    }
    return _homeVc;
}


@end
